package com.abel.pay.controller;

import com.abel.pay.service.PayService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author heyangyang
 * @since 2024-04-23
 */

@RestController
@RequestMapping("/pay")
public class PayController {

    @Resource
    private PayService payService;

    @GetMapping("{code}")
    public String pay(@PathVariable("code") String code) {
        payService.pay(code);
        return "success";
    }

}
